/**
 * 商品评论
 */

import request from "@/request";

/**
 * 获取当前商家用户的全部商品信息
 * @param formData 以table形式传输至后端的数据
 * @returns {*}
 */
export function selectCommodityByCurrentMerchantAndAuditState(formData) {
    return request({
        url: '/merchant/commodity/definedMerchant/all',
        method: 'post',
        headers: {"Content-Type": "multipart/form-data"},
        data: formData
    })
}

/**
 * 根据商品名称查询当前商家用户的所有已发布的商品信息
 * @param formData 以table形式传输至后端的数据
 * @returns {*}
 */
export function selectCommodityByCurrentMerchantAndText(formData) {
    return request({
        url: '/merchant/commodity/issued/select',
        method: 'post',
        headers: {"Content-Type": "multipart/form-data"},
        data: formData
    })
}

/**
 * 根据商品id查询针对该商品的评论
 * @param formData 以table形式传输至后端的数据
 * @returns {*}
 */
export function selectInformationByCommodityId(formData) {
    return request({
        url: '/comment/commodity/all',
        method: 'post',
        headers: {"Content-Type": "multipart/form-data"},
        data: formData
    })
}